UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FZ4r+bBPUFGeC+TVPz8CsvVZJO5Y+7Erie+e6XmESls='
WHERE
key_id = '5fc6e438def64e19a01c2a61824de91cad014c188209d320a2977bf2cbc3d628'
AND (
token = 'FZ4r+bBPUFGeC+TVPz8CsvVZJO5Y+7Erie+e6XmESls='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)