UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ytc1I37cF9CULznGzILoU2WDDFC9UfdK8XjgrEwFDlc='
WHERE
key_id = 'ee3621284c6b05afba0de5f50414224c3412b9dc0f2fa26b1389c605406dc4f3'
AND (
token = 'ytc1I37cF9CULznGzILoU2WDDFC9UfdK8XjgrEwFDlc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)