UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sEIS7QX0/OKswUkRHQ433467xwDSP1D5Mh9FUs3zjNU='
WHERE
key_id = '5b0d132aa799ab81042f72b369f29169e51ea2c2ab47aac53efc75a9815de755'
AND (
token = 'sEIS7QX0/OKswUkRHQ433467xwDSP1D5Mh9FUs3zjNU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)