UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nOsMi5rYhI1+H1Gu8/Qyh+1AiXuEIbGhsLR4sIco25c='
WHERE
key_id = '0fbaebac63b172d305288b3f230dfc72e32d53326729e6e211becdc5daef9314'
AND (
token = 'nOsMi5rYhI1+H1Gu8/Qyh+1AiXuEIbGhsLR4sIco25c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)