UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+OTlL3uoCTyEMO+jCbcYWllet0Fqnop4NDaA4JM5i/Y='
WHERE
key_id = 'aba7e82584b9a345bf214eea6b6bdc5b555e8fdc1d8a3554f6e0ca0574e7d62d'
AND (
token = '+OTlL3uoCTyEMO+jCbcYWllet0Fqnop4NDaA4JM5i/Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)