UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MmW75+8PSkL9M3x70/penl5dNpV5bHQLGLIKK3Je4gI='
WHERE
key_id = '0e76ee860bde53236ec8984d93a18a52a731007b3cf5f98d8179847b1ff133c6'
AND (
token = 'MmW75+8PSkL9M3x70/penl5dNpV5bHQLGLIKK3Je4gI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)