UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IviM/+WM287G/TirrxRI4/rtqWSTt9HRKsaWQdf5Zm0='
WHERE
key_id = '7fe4e177229525fefa9c0c7e1c75cf5e860b19cdc646530dca6c9098187c62e2'
AND (
token = 'IviM/+WM287G/TirrxRI4/rtqWSTt9HRKsaWQdf5Zm0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)