UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hqzeK5yl5UD2+aUyVDM+/2Rr04zJZf13bYfpGyjpgI8='
WHERE
key_id = '648b250a579f545d8c893cf59fa90f8ba3d0b0f279e954c71a81a4e7bd9b41c5'
AND (
token = 'hqzeK5yl5UD2+aUyVDM+/2Rr04zJZf13bYfpGyjpgI8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)