UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5IxMpfBgmPBNMbZ9kr0bEvfO/oC73K3EcKA1IFPLrTI='
WHERE
key_id = 'cb25df2148b8d19a98cd3166ee3e38da9653e2cc6b19f71b17610c2b32ba279f'
AND (
token = '5IxMpfBgmPBNMbZ9kr0bEvfO/oC73K3EcKA1IFPLrTI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)