UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U1vi5ALSmMwzb6FpUKfwa1HlTDdbVoL5aDS5YcwYg+o='
WHERE
key_id = 'c85a60ce9d8c9396a7297f8788f33971cccc0cb08cd2554319cdd4c64ce210b0'
AND (
token = 'U1vi5ALSmMwzb6FpUKfwa1HlTDdbVoL5aDS5YcwYg+o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)