UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fIjKyGf+pfugdNKzwDvYuyftdb9y+H/ZF0brCuLTaFU='
WHERE
key_id = '0b075341cccaeb052969169fc5a64e542010dcbc26174492ac96677a946a7d0b'
AND (
token = 'fIjKyGf+pfugdNKzwDvYuyftdb9y+H/ZF0brCuLTaFU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)