UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FFTdn92jmoEaZncWrzKvXMbbH6iSRP3aTyiDEUQiUEs='
WHERE
key_id = 'c412da609df508db44cd2d99fbcda9b8ea737c9c868d663f4548e12729d5b843'
AND (
token = 'FFTdn92jmoEaZncWrzKvXMbbH6iSRP3aTyiDEUQiUEs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)