UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QqVQKsHZo3kMz2xgq0SmSrs3wJyyjoVtkd2ii7O7/ww='
WHERE
key_id = '48baca6a595cb4f2d90a2f9cf6599d38624907fca290603cce9cc65d565249e2'
AND (
token = 'QqVQKsHZo3kMz2xgq0SmSrs3wJyyjoVtkd2ii7O7/ww='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)