UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's12+uwp122/5tMHw99R2PqGbxDd8uwRbHCvyL3Gwqgk='
WHERE
key_id = 'a5cdaeb6bba3eb0a840291f9bd792aa7e894a14ec000cd616c41621e2f1dbda9'
AND (
token = 's12+uwp122/5tMHw99R2PqGbxDd8uwRbHCvyL3Gwqgk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)