UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Qz2m+N4fpa+5gEJXKBPkZ9+9x7vc/38cCcsp/M/bjc='
WHERE
key_id = 'b47fe781b1f2e63e16a1ae4f3490c3c11cef069962bb58948be0ee6b92a02759'
AND (
token = '/Qz2m+N4fpa+5gEJXKBPkZ9+9x7vc/38cCcsp/M/bjc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)