UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f3r5ruuKrjglyLp4AvIMDfnD/IeTE9Pe8qmLFIgQgDs='
WHERE
key_id = '4b30ba899ed3fc2f046a2faf08b7276fc81015e7559ee199bf5e2d7f8f1bcbe8'
AND (
token = 'f3r5ruuKrjglyLp4AvIMDfnD/IeTE9Pe8qmLFIgQgDs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)